﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="details.aspx.vb" Inherits="ArduinoPlayground.Detail" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" runat="server" contentplaceholderid="MainContent">
                 <h2>
                    Selected Project Details:<asp:SqlDataSource ID="Detail_SqlDataSource" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ArduinoPlaygroundConnectionString %>" 
                        ProviderName="<%$ ConnectionStrings:ArduinoPlaygroundConnectionString.ProviderName %>" 
                        SelectCommand="SELECT [ID], [Title], [Author], [Difficulty], [Components], [Costs], [Duration], [Instructions], [Preview] FROM [Project] WHERE ([ID] = ?)">
                        <SelectParameters>
                            <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                    </h2>
                 <br />
                   
                      &nbsp;<strong>Rate This Project:</strong> 
                      <asp:Rating ID="Rating1" runat="server"
                      CurrentRating="1" 
                      MaxRating="5"
                      StarCssClass="empty"
                      WaitingStarCssClass="empty"
                      EmptyStarCssClass="empty" 
                      FilledStarCssClass="smiley-done">
                 </asp:Rating>
                 
                &nbsp;
                 <asp:Button ID="btn_Rate" runat="server" Text="Rate" />
                 
                &nbsp;
                 <asp:Button ID="btn_Like" runat="server" Text="Like" />
                 <asp:Image ID="img_Like" runat="server" ImageUrl="~/Styles/Like_1.jpg" />
                 
                &nbsp;&nbsp;
                 <asp:DropDownList ID="ddl_catagories" runat="server" 
                     DataSourceID="Catagories_SqlDataSource1" DataTextField="CatagoriesName" 
                     DataValueField="ID">
                 </asp:DropDownList>
                 <asp:SqlDataSource ID="Catagories_SqlDataSource1" runat="server" 
                     ConnectionString="<%$ ConnectionStrings:ArduinoPlaygroundConnectionString %>" 
                     ProviderName="<%$ ConnectionStrings:ArduinoPlaygroundConnectionString.ProviderName %>" 
                     SelectCommand="SELECT [ID], [CatagoriesName] FROM [Catagories]">
                 </asp:SqlDataSource>
&nbsp;<asp:Button ID="btn_catagory" runat="server" Text="Catagorize" />
&nbsp;<p>
                    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                        CellPadding="4" DataSourceID="Detail_SqlDataSource" ForeColor="Black" 
                        GridLines="Horizontal" Height="238px" HorizontalAlign="Left" Width="430px" 
                        BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" 
                        BorderWidth="1px" DataKeyNames="ID">
                        <EditRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                        <Fields>
                            <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                            <asp:BoundField DataField="Author" HeaderText="Author" 
                                SortExpression="Author" />
                            <asp:BoundField DataField="Difficulty" HeaderText="Difficulty" 
                                SortExpression="Difficulty" />
                            <asp:BoundField DataField="Components" HeaderText="Components" 
                                SortExpression="Components" />
                            <asp:BoundField DataField="Costs" HeaderText="Costs" SortExpression="Costs" />
                            <asp:BoundField DataField="Duration" HeaderText="Duration" 
                                SortExpression="Duration" />
                            <asp:BoundField DataField="Instructions" HeaderText="Instructions" 
                                SortExpression="Instructions" />
                            <asp:ImageField DataImageUrlField="Preview" HeaderText="Preview">
                                <ControlStyle Height="320px" Width="360px" />
                            </asp:ImageField>
                        </Fields>
                        <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                        <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                    </asp:DetailsView>
                    <br />
                       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </p>
                 <p>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     <asp:Label ID="lbl_Title" runat="server" Font-Bold="True" Text="Title:"></asp:Label>
&nbsp; <asp:TextBox ID="txtbox_Title" runat="server" Width="242px"></asp:TextBox>
                </p>
                 <p>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     <asp:Label ID="lbl_Comment" runat="server" Font-Bold="True" Text="Comment:"></asp:Label>
&nbsp;</p>
                 <p>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     <asp:TextBox ID="txtbox_Comment" runat="server" Height="81px" 
                         TextMode="MultiLine" Width="305px"></asp:TextBox>
                     &nbsp;</p>
                 <p>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     <asp:Button ID="btn_AddComment" runat="server" Text="Submit" />
                </p>
                 <p>
                     <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                     </asp:ToolkitScriptManager>
                 </p>
<p>
                     &nbsp;<br />
                     <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                         BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                         CellPadding="4" DataSourceID="Comment_SqlDataSource" ForeColor="Black" 
                         GridLines="Horizontal" Height="81px" 
                         style="text-align: center; font-style: italic;" Width="802px">
                         <Columns>
                             <asp:BoundField DataField="Author" HeaderText="Author" 
                                 SortExpression="Author" />
                             <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                             <asp:BoundField DataField="CommentBody" HeaderText="Comment" 
                                 SortExpression="CommentBody" />
                         </Columns>
                         <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                         <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                         <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                         <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                         <SortedAscendingCellStyle BackColor="#F7F7F7" />
                         <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
                         <SortedDescendingCellStyle BackColor="#E5E5E5" />
                         <SortedDescendingHeaderStyle BackColor="#242121" />
                     </asp:GridView>
                     <asp:SqlDataSource ID="Comment_SqlDataSource" runat="server" 
                         ConnectionString="<%$ ConnectionStrings:ArduinoPlaygroundConnectionString %>" 
                         ProviderName="<%$ ConnectionStrings:ArduinoPlaygroundConnectionString.ProviderName %>" 
                         SelectCommand="SELECT [Author], [Title], [CommentBody], [Project_fkID] FROM [Comments] WHERE ([Project_fkID] = ?)">
                         <SelectParameters>
                             <asp:QueryStringParameter Name="Project_fkID" QueryStringField="ID" 
                                 Type="Int32" />
                         </SelectParameters>
                     </asp:SqlDataSource>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <br />
                 </p>
            </asp:Content>

